<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="/static/styles1.css">
</head>
<body>
    <!-- 返回按钮 -->
    <a href="{{ url_for('index') }}" class="back-button">&larr;</a>
    <div class="container">
        <div class="title">书库</div>
        <form method="POST" style="width: 100%;">
            <div class="form-group">
                <input type="text" name="username" placeholder="账号" required>
            </div>
            <div class="form-group">
                <input type="password" name="password" placeholder="密码" required>
            </div>
            <div class="btn-group-custom">
                <button type="submit" class="btn-custom">登录</button>
                <a href="{{ url_for('register') }}" class="btn-custom">注册</a>
            </div>
        </form>
        <!-- Flash Messages -->
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert flash-message">
                        {{ message }}
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}
    </div>
</body>
</html>
